<script setup>
import { useCounterStore } from '@/stores/counter';

const counteStore = useCounterStore()

const updateCount =()=>{
   //1、直接更新
   counteStore.count += 1;
   console.log(counteStore.count)

   //2、批量更新
   counteStore.$patch({
    count:counteStore.count+100,
    project:"足球"
   })
}

</script>

<template>
  <div class="about">
    <h1>This is an about page</h1>
    <button @click="updateCount">点击更新</button>
  </div>
</template>

<style>
@media (min-width: 1024px) {
  .about {
    min-height: 100vh;
    display: flex;
    align-items: center;
  }
}
</style>
